package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 原料管理对象 raw_material_management
 *
 * @author ruoyi
 * @date 2025-05-24
 */
public class RawMaterialManagement extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 原料唯一标识符(主键) */
    private Long id;

    /** 原料名称(如"小麦粉") */
    @Excel(name = "原料名称")
    private String materialName;

    /** 原料简写(如"XMF") */
    @Excel(name = "原料简写")
    private String materialAlias;

    /** 原料条码(支持EAN-13/Code128等) */
    @Excel(name = "原料条码(支持EAN-13/Code128等)")
    private String barcode;

    /** 原料成本价(单位：元) */
    @Excel(name = "原料成本价(单位：元)")
    private BigDecimal costPrice;

    /** 原料分类ID(关联分类表) */
    @Excel(name = "原料分类ID(关联分类表)")
    private Long categoryId;

    /** 单位(如"千克"、"升") */
    @Excel(name = "单位")
    private String unit;

    /** 保质期(天数，0表示不过期) */
    @Excel(name = "保质期(天数，0表示不过期)")
    private Long shelfLife;

    /** 原料图片URL(如"uploads/material/1.jpg") */
    @Excel(name = "原料图片URL")
    private String imageUrl;

    /** 原料状态 */
    @Excel(name = "原料状态")
    private String status;

    /** 是否参与库存计算(1=参与,0=不参与) */
    @Excel(name = "是否参与库存计算(1=参与,0=不参与)")
    private Integer isInventoryCounted;

    /** 库存上限(0表示无上限) */
    @Excel(name = "库存上限(0表示无上限)")
    private Long maxInventory;

    /** 库存预警数量(低于此值触发预警) */
    @Excel(name = "库存预警数量(低于此值触发预警)")
    private Long warningQuantity;

    /** 原料品牌(如"金龙鱼") */
    @Excel(name = "原料品牌")
    private String brand;

    /** 原料描述(成分、规格、用途等) */
    @Excel(name = "原料描述(成分、规格、用途等)")
    private String description;

    /** 规格型号(如"25kg/袋") */
    @Excel(name = "规格型号")
    private String specification;

    /** 默认供应商ID(关联供应商表) */
    @Excel(name = "默认供应商ID(关联供应商表)")
    private Long supplierId;

    /** 最小起订量 */
    @Excel(name = "最小起订量")
    private Long minOrderQuantity;

    /** 采购提前期(天数) */
    @Excel(name = "采购提前期(天数)")
    private Long leadTime;

    /** 最近一次采购价 */
    @Excel(name = "最近一次采购价")
    private BigDecimal lastPurchasePrice;

    /** 最近一次采购日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最近一次采购日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastPurchaseDate;

    /** 最后更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastUpdateTime;

    /** 手机号 */
    @Excel(name = "手机号")
    private String phone;


    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setMaterialName(String materialName)
    {
        this.materialName = materialName;
    }

    public String getMaterialName()
    {
        return materialName;
    }

    public void setMaterialAlias(String materialAlias)
    {
        this.materialAlias = materialAlias;
    }

    public String getMaterialAlias()
    {
        return materialAlias;
    }

    public void setBarcode(String barcode)
    {
        this.barcode = barcode;
    }

    public String getBarcode()
    {
        return barcode;
    }

    public void setCostPrice(BigDecimal costPrice)
    {
        this.costPrice = costPrice;
    }

    public BigDecimal getCostPrice()
    {
        return costPrice;
    }

    public void setCategoryId(Long categoryId)
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId()
    {
        return categoryId;
    }

    public void setUnit(String unit)
    {
        this.unit = unit;
    }

    public String getUnit()
    {
        return unit;
    }

    public void setShelfLife(Long shelfLife)
    {
        this.shelfLife = shelfLife;
    }

    public Long getShelfLife()
    {
        return shelfLife;
    }

    public void setImageUrl(String imageUrl)
    {
        this.imageUrl = imageUrl;
    }

    public String getImageUrl()
    {
        return imageUrl;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setIsInventoryCounted(Integer isInventoryCounted)
    {
        this.isInventoryCounted = isInventoryCounted;
    }

    public Integer getIsInventoryCounted()
    {
        return isInventoryCounted;
    }

    public void setMaxInventory(Long maxInventory)
    {
        this.maxInventory = maxInventory;
    }

    public Long getMaxInventory()
    {
        return maxInventory;
    }

    public void setWarningQuantity(Long warningQuantity)
    {
        this.warningQuantity = warningQuantity;
    }

    public Long getWarningQuantity()
    {
        return warningQuantity;
    }

    public void setBrand(String brand)
    {
        this.brand = brand;
    }

    public String getBrand()
    {
        return brand;
    }

    public void setDescription(String description)
    {
        this.description = description;
    }

    public String getDescription()
    {
        return description;
    }

    public void setSpecification(String specification)
    {
        this.specification = specification;
    }

    public String getSpecification()
    {
        return specification;
    }

    public void setSupplierId(Long supplierId)
    {
        this.supplierId = supplierId;
    }

    public Long getSupplierId()
    {
        return supplierId;
    }

    public void setMinOrderQuantity(Long minOrderQuantity)
    {
        this.minOrderQuantity = minOrderQuantity;
    }

    public Long getMinOrderQuantity()
    {
        return minOrderQuantity;
    }

    public void setLeadTime(Long leadTime)
    {
        this.leadTime = leadTime;
    }

    public Long getLeadTime()
    {
        return leadTime;
    }

    public void setLastPurchasePrice(BigDecimal lastPurchasePrice)
    {
        this.lastPurchasePrice = lastPurchasePrice;
    }

    public BigDecimal getLastPurchasePrice()
    {
        return lastPurchasePrice;
    }

    public void setLastPurchaseDate(Date lastPurchaseDate)
    {
        this.lastPurchaseDate = lastPurchaseDate;
    }

    public Date getLastPurchaseDate()
    {
        return lastPurchaseDate;
    }

    public void setLastUpdateTime(Date lastUpdateTime)
    {
        this.lastUpdateTime = lastUpdateTime;
    }

    public Date getLastUpdateTime()
    {
        return lastUpdateTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("materialName", getMaterialName())
                .append("materialAlias", getMaterialAlias())
                .append("barcode", getBarcode())
                .append("costPrice", getCostPrice())
                .append("categoryId", getCategoryId())
                .append("unit", getUnit())
                .append("shelfLife", getShelfLife())
                .append("imageUrl", getImageUrl())
                .append("status", getStatus())
                .append("isInventoryCounted", getIsInventoryCounted())
                .append("maxInventory", getMaxInventory())
                .append("warningQuantity", getWarningQuantity())
                .append("brand", getBrand())
                .append("description", getDescription())
                .append("specification", getSpecification())
                .append("supplierId", getSupplierId())
                .append("minOrderQuantity", getMinOrderQuantity())
                .append("leadTime", getLeadTime())
                .append("lastPurchasePrice", getLastPurchasePrice())
                .append("lastPurchaseDate", getLastPurchaseDate())
                .append("lastUpdateTime", getLastUpdateTime())
                .append("createTime", getCreateTime())
                .append("phone",getPhone())
                .toString();
    }
}
